# -*- coding: utf-8 -*-
from ragendja.settings_pre import *

DEBUG=True

# Increase this when you update your media on the production site, so users
# don't have to refresh their cache. By setting this your MEDIA_URL
# automatically becomes /media/MEDIA_VERSION/
MEDIA_VERSION = 1

MEDIA_URL = '/static/'

CACHE_BACKEND = 'memcached://'

# Make this unique, and don't share it with anybody.
SECRET_KEY = '1234567890'

SITE_URL='http://http://www.bioventurist.com/'

#ENABLE_PROFILER = True
#ONLY_FORCED_PROFILE = True
#PROFILE_PERCENTAGE = 25
#SORT_PROFILE_RESULTS_BY = 'cumulative' # default is 'time'
#PROFILE_PATTERN = 'ext.db..+\((?:get|get_by_key_name|fetch|count|put)\)'

# Enable I18N and set default language to 'en'
USE_I18N = True
LANGUAGE_CODE = 'en'

#Restrict supported languages (and JS media generation)
#LANGUAGES = (
#    ('de', 'German'),
#    ('en', 'English'),
#)


ACCOUNT_ACTIVATION_DAYS = 3

CACHE_TIMEOUT = 2592000


TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth',
    'django.core.context_processors.media',
    'django.core.context_processors.request',
    'django.core.context_processors.i18n',
)

CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True


MIDDLEWARE_CLASSES = (
    'ragendja.middleware.ErrorMiddleware',
    'django.middleware.http.ConditionalGetMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    # Django authentication
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    # Google authentication
    #'ragendja.auth.middleware.GoogleAuthenticationMiddleware',
    # Hybrid Django/Google authentication
    #'ragendja.auth.middleware.HybridAuthenticationMiddleware',
    'django.middleware.cache.UpdateCacheMiddleware',    
    'django.middleware.common.CommonMiddleware',    
    'django.middleware.cache.FetchFromCacheMiddleware',    
    'django.middleware.locale.LocaleMiddleware',
    'ragendja.sites.dynamicsite.DynamicSiteIDMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
    'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
    'ragendja.middleware.LoginRequiredMiddleware',
    #'firepython.middleware.FirePythonDjango',
    'bvblogapp.middleware.Pagination',
    
    #logging
    #'djangologging.middleware.LoggingMiddleware',
)

#required for logging
# see http://code.google.com/p/django-logging/wiki/Overview
#INTERNAL_IPS = ('127.0.0.1:8089',)
#LOGGING_OUTPUT_ENABLED = False

#for sending email
#EMAIL_HOST = 'localhost'
#EMAIL_PORT = 110
#EMAIL_HOST_USER = 'user'
#EMAIL_HOST_PASSWORD = 'password'
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'info@bioventurist.com' #'ben.mcgee.good@gmail.com' #'user@localhost'
#SERVER_EMAIL = 'user@localhost'

LOGIN_REQUIRED_PREFIXES = (
    '/mt/',
    '/edit/',
   # '/other/path/',
)
NO_LOGIN_REQUIRED_PREFIXES = (
    #'/some/path/without_login/',
    #'/companies/',
)

#lets me set up a custom user
AUTH_USER_MODULE = 'bvuserapp.models'

# Google authentication
#AUTH_USER_MODULE = 'ragendja.auth.google_models'
#AUTH_ADMIN_MODULE = 'ragendja.auth.google_admin'
# Hybrid Django/Google authentication
#AUTH_USER_MODULE = 'ragendja.auth.hybrid_models'

GLOBALTAGS = (
    'ragendja.templatetags.ragendjatags',
    'django.templatetags.i18n',
)

LOGIN_URL = '/account/login/'
LOGOUT_URL = '/account/logout/'
LOGIN_REDIRECT_URL = '/'

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.sessions',
    'django.contrib.admin',
    'django.contrib.webdesign',
    'django.contrib.flatpages',
    'django.contrib.redirects',
    'django.contrib.sites',
    'appenginepatcher',
    'bvapp',
    'bvmapapp',
    'bvblogapp',
    'bvrssapp',
    'bvsearchapp',
    'bvmtapp',
    'bvuserapp',
    'reports',
    'registration',
    'mediautils',
    'faq',
    'myapp',
)

# List apps which should be left out from app settings and urlsauto loading
IGNORE_APP_SETTINGS = IGNORE_APP_URLSAUTO = (
    # Example:
    # 'django.contrib.admin',
    # 'django.contrib.auth',
    # 'yetanotherapp',
)
# BioVenturist specific settings
#FREEBASE_DOMAIN  = 'freebase.com'
FREEBASE_DOMAIN  = 'freebase.com'
#BVR_FREEBASE_USER = 'bvr_edit1'
BVR_FREEBASE_USER = 'bvr_edit1'  
BVR_FREEBASE_USER_PW = '123456'
BVR_DOMAIN = '/base/bioventurist/'
BVR_DELIMITER = '+++'


BLOG_POSTS_ON_PAGE = 5

RECAPTCHA_PRIVATE = '6LeG2QgAAAAAABweXX-w_4680QQ42y2-l9xcR_Zq'
RECAPTCHA_PUBLIC = '6LeG2QgAAAAAAJvhTNUk4M1wugQH4UOa7ALwRzjr'

ROOT_URL = 'http://www.bioventurist.com'
if DEBUG:
    ROOT_URL = 'http://127.0.0.1:8000'

from ragendja.settings_post import *


